package com.qf.entity;

import java.io.File;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 用户表(User)表实体类
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_user")
public class User extends Model<User> {
    //序号
    @TableId(type = IdType.AUTO)
    private Integer id;
    //昵称
    private String nickname;
    //手机号
    private String phone;
    //密码
    private String password;

    //
    private String dTimes;
    //正念次数
    private Integer mTimes;
    //头像
    private String pic;
    //会员状态1 会员 0 非会员
    private String status;
    //注册时间
    @TableField(fill = FieldFill.INSERT)
    private Date crateTime;
    //修改时间
    @TableField(fill = FieldFill.INSERT)
    private Date updateTime;
    //介绍
    private String text;

    //token
    private  String token;
    //登录时间
    private Date logonTime;

    public User(String nickname,String phone,String password){
        this.nickname = nickname;
        this.phone = phone;
        this.password = password;

        this.pic = null;
        this.status = "0";
        this.crateTime = new Date();
        this.updateTime = new Date();
        this.text = null;
    }
}